import request from '../index.js'

// 查询APPLET银行
export const getBasBankList = params => {
  return request.get('/api/dropDown/basBankList', params)
}
// 查询APPLET商品分类
export const getBasGoodsTypeList = params => {
  return request.get('/api/appletBasGoodsType', params)
}
// 查询APPLET商品品牌
export const getBasGoodsBrandList = params => {
  return request.get('/api/appletBasGoodsBrand', params)
}

// 查询APPLET库区
export const getBasLocation = params => {
  return request.get('/api/appletBasLocation', params)
}
// 查询APPLET车辆
// export const getBasCar = params => {
//   return request.get('/api/appletBasCar', params)
// }

/* codeLoading */

/* distributeManage */

// 获取小程序配送单已配送/未配送信息
export const getLogisticsLoad = params => {
  return request.get('/api/appletLogisticsLoad', params)
}
// 获取小程序配送单已配送/未配送 商品详情信息
export const getLogisticsLoadDetail = params => {
  return request.get('/api/appletLogisticsLoad/detail', params)
}
// 扫码获取小程序配送单新增数据
export const getLogisticsLoadOrderListForAdd = params => {
  return request.get('/api/appletLogisticsLoad/orderListForAdd', params)
}
// 小程序配送单客户送达
export const postLogisticsLoadReach = data => {
  return request.post('/api/appletLogisticsLoad/reach', data)
}
//保存配送单
export const appletLogisticsLoadAdd = data => {
  return request.post('/api/appletLogisticsLoad/addOrSave', data)
}

/* bottleBox */

// 查询APPLET客户
export const getBasCustomerList = params => {
  return request.get('/api/appletBasCustomer', params)
}
// 查询APPLET回瓶回箱
export const getWareReturnBottleBoxList = params => {
  return request.get('/api/appletWareReturnBottleBox', params)
}
// 查询APPLET回瓶回箱明细
export const getWareReturnBottleBoxDetail = params => {
  return request.get('/api/appletWareReturnBottleBox/detail', params)
}
// 列表中提交(审核APPLET回瓶回箱)
export const postWareReturnBottleBoxPass = data => {
  return request.post('/api/appletWareReturnBottleBox/pass', data)
}
// 详情中保存(新增或修改APPLET回瓶回箱)
export const postWareReturnBottleBoxAddOrSave = data => {
  return request.post('/api/appletWareReturnBottleBox/addOrSave', data)
}
// 详情中提交(保存并审核APPLET回瓶回箱)
export const postWareReturnBottleBoxSubmit = data => {
  return request.post('/api/appletWareReturnBottleBox/submit', data)
}
//获取人员信息
export const getSysUserList = data => {
  return request.get('/api/dropDown/sysUserList', data)
}
//添加回瓶回箱汇总单据时获取配送单信息(分页)
export const getLogisticsLoadList = data => {
  return request.get('/api/appletWareReturnBottleBoxCollect/logisticsLoadList', data)
}
//回瓶回箱汇总明细
export const getAppletWareReturnBottleBoxCollect = data => {
  return request.get('/api/appletWareReturnBottleBoxCollect/detail', data)
}
//获取仓库列表
export const getBasWarehouseList = data => {
  return request.get('/api/dropDown/basWarehouseList', data)
}
//获取库区列表
export const getLocationList = data => {
  return request.get('/api/dropDown/basLocationList', data)
}
//库位
export const getBasStorehouseList= data=> {
  return request.get('/api/dropDown/basStorehouseList', data)
}
//详情中保存
export const appletWareReturnBottleBoxCollectAddOrSave = data => {
  return request.post('/api/appletWareReturnBottleBoxCollect/addOrSave', data)
}
//下拉车辆
export const getbasCar = data => {
  return request.get('/api/dropDown/basCarList', data)
}
//回瓶回箱
export const addappletWareReturnBottleBox= data => {
  return request.post('/api/appletWareReturnBottleBox/addOrSave', data)
}
//小程序回箱入库

export const returnBox= data => {
  return request.post('/api/appletLogisticsLoad/returnBox', data)
}
//获取客户售点
export const getbasCustomerSellingPointList = data => {
  return request.get('/api/dropDown/basCustomerSellingPointList', data)
}
//获取回瓶回箱
export const getAppletWareReturnBottleBox = data => {
  return request.get('/api/appletWareReturnBottleBox', data)
}
//获取回瓶回箱明细
export const getAppletWareReturnBottleBoxDetail = data => {
  return request.get('/api/appletWareReturnBottleBox/detail', data)
}
//

export const saveAppletWareReturnBottleBoxDetail = data => {
  return request.post('/api/appletWareReturnBottleBox/addOrSave', data)
}

export const removeAppletWareReturnBottleBoxDetail = data => {
  return request.post('/api/appletWareReturnBottleBox/remove', data)
}
//获取已装车
export const getLoadList = data => {
  return request.get('/api/appletLogisticsLoad/loadList', data)
}
//获取已装车详情
export const getLoadListDetail = data => {
  return request.get('/api/appletLogisticsLoad/loadList/detail', data)
}


export const batchAddOrSave = data => {
  return request.post('/api/appletWareReturnBottleBox/batchAddOrSave', data)
}

//获取客户区域
export const getBasCustomerAreaList = data => {
  return request.get('/api/dropDown/basCustomerAreaList', data)
}

//获取客户区域树
export const getBasCustomerAreaTree = data => {
  return request.get('/api/dropDown/basCustomerAreaTree', data)
}

//获取客户部门
export const getChildSysDeptList = data => {
  return request.get('/api/dropDown/childSysDeptList', data)
}

//获取销售体系
export const getBasSaleSystemList = data => {
  return request.get('/api/dropDown/basSaleSystemList', data)
}

//保存客户
export const appBasCustomerAddOrSave = data => {
  return request.post('/api/appletBasCustomer/addOrSave', data)
}
//生成仓库
export const createWarehouse = data => {
  return request.post('/api/appletBasCustomer/createWarehouse', data)
}

export const basCustomerSellingPointList = data => {
  return request.get('/api/dropDown/basCustomerSellingPointList', data)
}

//获取销售体系
export const getBasSettlementList = data => {
  return request.get('/api/dropDown/basSettlementList', data)
}
//获取拜访线路
export const basLineList = data => {
  return request.get('/api/dropDown/basLineList', data)
}

